package com.lh.service;

import com.lh.model.File;
import com.lh.util.MyException;

/**
 * @Author LuoHang
 * @Date 2022-05-10 23:03
 **/
public interface FileService {

    /**
     * upload
     * @param file file
     * @return boolean
     */
    default boolean upload(File file){ return false;}

    /**
     * 事务测试
     * @param file file
     * @return boolean
     * @throws MyException 自定义异常
     */
    default boolean addFile(File file) throws MyException { return false;}

    /**
     * getFileById
     * @param id id
     * @return file
     */
    default File getFileById(Integer id){ return null;}

    /**
     * deleteById
     * @param id id
     * @return int
     */
    int deleteById(Integer id);
}
